//
//  QSTouchIDTool.h
//  myTest
//
//  Created by apple on 2017/9/14.
//  Copyright © 2017年 apple. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef enum : NSUInteger {
    QSVerifyTouchIDState_WithoutTouchID = 0,      // 设备没有TouchID功能
    QSVerifyTouchIDState_VerifyFailed   = -1,     // 连续三次指纹识别错误
    QSVerifyTouchIDState_UserCancel     = -2,     // 点击了取消按钮
    QSVerifyTouchIDState_UserFallback   = -3,     // 点击了输入密码按钮
    QSVerifyTouchIDState_InvalidContext = -4,     // LAContext上下文已失效
} QSVerifyTouchIDState;

typedef void (^httpResponseSuccessBlock) (id result);

@interface QSTouchIDTool : NSObject
/**
 *  验证TouchID
 *
 *  @param fallBackTitle @"": 只显示取消按钮；非空会显示取消和fallBack两个按钮
 *  @param successBlock 验证成功的Block
 *  @param errorBlock 验证失败的Block
 */
+ (void)verifyTouchIDWithFallbackTitle:(NSString *)fallBackTitle success:(void (^)())successBlock error:(void (^)(QSVerifyTouchIDState stateCode))errorBlock;
@end
